package org.slf4jx.core;

/**
 * 日志界别枚举，用于判断大小
 * @author jjliu
 * @date 2023/1/15
 */
public enum Slf4jxLevelEnum {
    trace,debug,info,warn,error
    ;

    public static Slf4jxLevelEnum of(String level){
        if(level==null || level.trim().length()==0){
            return null;
        }
        for(Slf4jxLevelEnum slf4JxLevelEnum : Slf4jxLevelEnum.values()){
            if(slf4JxLevelEnum.name().equalsIgnoreCase(level)){
                return slf4JxLevelEnum;
            }
        }
        return null;
    }
}
